/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session03;

import java.io.CharArrayWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author macbookpro
 */
public class CharArrayWriterTest {
    public static void main(String[] args) {
        try {
            FileWriter fw = new FileWriter("text file.txt");
            fw.write("Hello World!\n");
            fw.write("Xin chao!");
            fw.close();
        } catch (IOException ex) {
            Logger.getLogger(CharArrayWriterTest.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
